package MyArrayList;

import java.util.Arrays;

public class Text {
    public static void main(String[] args) {

        MyList<Integer> myList = new MyList<>();
        myList.addLast(1);
        myList.addLast(2);
        myList.addLast(3);
        myList.addLast(4);
        System.out.println(myList.contain(3));
        myList.clear();
        myList.display();
        System.out.println(myList);
/*        MyList<String> myList = new MyList<>();
        myList.addFirst("李四");
        myList.addFirst("王五");
        myList.addFirst("张三");
        myList.display();
        System.out.println();
        System.out.println("==================");
        System.out.println(myList.contain("李四"));*/
/*        myList.remove(2);
        myList.display();*/

/*        MyList<Integer> myList = new MyList<>();
        myList.addFirst(1);
        myList.addFirst(2);
        myList.addFirst(3);
        myList.addFirst(4);
        myList.display();*/


/*        MyList<Integer> myList = new MyList<>();
        myList.addLast(1);
        myList.addLast(2);
        myList.addLast(3);
        myList.addLast(4);
        myList.addLast(5);
        myList.addLast(6);
        myList.addLast(7);
        myList.addLast(8);
        myList.addLast(9);
        myList.addLast(10);
        myList.addLast(11);
        myList.addLast(12);
        myList.display();
        System.out.println();
        System.out.println("==============");

        myList.addLast(11);
        myList.display();
        System.out.println();
        System.out.println("==============");

        myList.addFirst(33);
        myList.display();
        System.out.println();
        System.out.println("===============");

        myList.add(5,66);
        myList.display();
        System.out.println();
        System.out.println("================");

       // myList.add(100,222);
        *//*myList.removeLast();
        myList.removeLast();
        myList.removeLast();
        myList.removeLast();
        myList.removeLast();
        myList.removeLast();
        myList.display();*//*

        *//*myList.removeFirst();
        myList.removeFirst();
        myList.removeFirst();
        myList.removeFirst();
        myList.removeFirst();
        myList.removeFirst();
        myList.removeFirst();
        myList.display();
        System.out.println();
        System.out.println("==================");*//*

        myList.remove(3);
        myList.display();
        System.out.println();*/


    }
}
